<HTML><HEAD><TITLE>strongly_connected(+Graph)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(grasper)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>strongly_connected(+Graph)</H1>
Guarantees that a directed graph Graph is strongly connected.
<DL>
<DT><EM>Graph</EM></DT>
<DD>A graph.
</DD>
</DL>
<H2>Description</H2>
Guarantees that a directed graph Graph is strongly connected, i.e., that each vertex is reachable from any other one.
<H3>Fail Conditions</H3>
Fails 
			 if Graph is not a directed graph variable or
			 if Graph can not be constrained to be strongly connected.
			
<H2>Examples</H2>
<PRE>
?- strongly_connected(G).
No.

?- V`::[1,2]..[1,2,3,4], E`::[]..[[1,3],[2,4],[4,1],[4,3]], dirgraph(G,V,E), strongly_connected(G).
No.

?- V`::[]..[1,2,3], E`::[]..[[1,2],[2,1]], dirgraph(G,V,E), strongly_connected(G), graph_labeling(G).
V = []
E = []
G = dirgraph([], [])
Yes ? ;

V = [3]
E = []
G = dirgraph([3], [])
Yes ? ;

V = [2]
E = []
G = dirgraph([2], [])
Yes ? ;

V = [1]
E = []
G = dirgraph([1], [])
Yes ? ;

V = [1, 2]
E = [[1, 2], [2, 1]]
G = dirgraph([1, 2], [[1, 2], [2, 1]])
Yes
			</PRE>

</BODY></HTML>
